home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 131 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.0 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: bill@amber.ssd.hcsc.com (Bill Leonard)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Throwing an exception from within a signal handler
  5. Date: 24 Jan 1996 12:24:27 PST
  6. Organization: Harris Computer Systems, Ft. Lauderdale FL
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4e631s$2fg@hawk.hcsc.com>
  9. References: <4du0gr$8k8@galaxy.ucr.edu> <4e0moi$4dp@engnews1.Eng.Sun.COM> <4e35jg$k8c@galaxy.ucr.edu>
  10. Reply-To: Bill.Leonard@hawk.hcsc.com
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: 24 Jan 1996 19:58:52 GMT
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMQaVpky4NqrwXLNJAQHw7gH+MAVrRNtTfL3cQpgH2HMlylOok7Y4xggt
  15.     c0/e9OMhdA760ZhCOi2W4c8fbNqSCKL2NMKIi2mVt/gDMlCQBnQqoA==
  16.     =dmsQ
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article <4e35jg$k8c@galaxy.ucr.edu>, thp@cs.ucr.edu (Tom Payne) writes:
  20. > If the ABI implementation of signal blocking is missing or has high
  21. > overhead, then we can use global flags inside the program to reduce
  22. > blocking to setting a bit and reduce unblocking to clearing that bit
  23. > and checking whether a deferred signal has arrived (in which case
  24. > there is additional overhead to check which signal to process it).
  25.  
  26. Maybe I've missed something here, but wouldn't that code have to appear in
  27. every function prologue and epilogue?  The only reason for signal blocking
  28. (I thought) was that trying to propagate an exception into or through a
  29. stack frame that is partially constructed or destroyed is problematic.
  30.  
  31. I certainly wouldn't want code to check (and handle) a signal to be
  32. generated in every function prologue!  Talk about code bloat!
  33.  
  34. > Agreed!!  Note however that an increasing percentage of programs have
  35. > asynchornous aspects to them, under headings such as "event-driven",
  36. > "real-time", "multi-threaded", "parallel", "concurrent", etc.  
  37.  
  38. Many of those programs also have pretty stringent performance requirements.
  39. Our business *is* real-time, and I've seen many times when getting rid of
  40. just one instruction in a key location would buy a lot of performance.  I'd
  41. be against any requirement that forced me to add instructions in function
  42. prologues/epilogues.
  43.  
  44. -- 
  45. Bill Leonard
  46. Harris Computer Systems Corporation
  47. 2101 W. Cypress Creek Road
  48. Fort Lauderdale, FL  33309
  49. Bill.Leonard@mail.hcsc.com
  50.  
  51. These opinions and statements are my own and do not necessarily reflect the
  52. opinions or positions of Harris Computer Systems Corporation.
  53.  
  54. ------------------------------------------------------------------------------
  55. There's something wrong with an industry in which amazement is a common
  56. reaction to things going right.
  57.  
  58. "Hard work never scared me.  Oh, sure, it has startled me from a distance."
  59.                                                        -- Professor Fishhawk
  60. ------------------------------------------------------------------------------
  61. ---
  62. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  63.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  64.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  65.